import { IsNumber } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateShortsLikeDto {
  @ApiProperty({ description: '短剧ID', example: 1 })
  @IsNumber()
  shortsId: number;
}

export class ShortsLikeResponseDto {
  @ApiProperty({ description: '操作类型', enum: ['liked', 'unliked'] })
  action: string;

  @ApiProperty({ description: '点赞ID', required: false })
  id?: number;

  @ApiProperty({ description: '用户ID', required: false })
  userId?: number;

  @ApiProperty({ description: '短剧ID', required: false })
  shortsId?: number;

  @ApiProperty({ description: '创建时间', required: false })
  createdAt?: string;

  @ApiProperty({ description: '是否已点赞' })
  isLiked: boolean;

  @ApiProperty({ description: '操作消息', required: false })
  message?: string;
}

export class ApiShortsLikeResponseDto {
  @ApiProperty({ description: '响应状态码', example: 200 })
  code: number;

  @ApiProperty({ description: '响应消息', example: 'success' })
  message: string;

  @ApiProperty({ description: '响应数据' })
  data: ShortsLikeResponseDto;

  @ApiProperty({ description: '时间戳' })
  timestamp: number;

  @ApiProperty({ description: '请求ID' })
  requestId: string;
}
